import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/home/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/:pathMatch(.*)*',
      name: 'NotFound',
      component: () => import('@/components/noFond.vue'),
    },
    {
      path: '/',
      name: 'login',
      component: () => import('../views/login/login.vue')
    },
    {
      path: '/index',
      name: 'index',
      component: Home,
      children: [
        // {
        //   path: '/index/dept',
        //   component: () => import('../views/home/child/dept.vue'),
        // },
        // {
        //   path: '/index/user',
        //   component: () => import('../views/home/child/user.vue'),
        // },
        // {
        //   path: '/index/post',
        //   component: () => import('../views/home/child/post.vue'),
        // },
        // {
        //   path: '/index/sys',
        //   component: () => import('../views/home/child/sys.vue'),
        // }
      ]
    }
  ]
})

export default router
